package com.clstu.mhl.service;

import com.clstu.mhl.dao.EmployeeDAO;
import com.clstu.mhl.domain.Employee;

/**
 * 该类完成对Employee表的各种操作,调用EmployeeDAO
 */
public class EmployeeService {
    //成员,用于调用方法
    private EmployeeDAO employeeDAO = new EmployeeDAO();
    //编写一个方法用于根据id和pwd返回一个对象
    public Employee getByIdAndPwd(String id,String pwd){
        return employeeDAO.querySingle("select * from employee where id=? and pwd=md5(?)",Employee.class,id,pwd);
    }
}
